home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Bus / C / Commander Demo / Commander Demo.rsrc / TEXT_5029_Ascii.txt < prev    next >
Encoding:
Text File  |  1993-09-07  |  904 b   |  27 lines

  1. ¬†Ascii (character)  -> Number (0 to 255)
  2.                                                                                     Pg 42-10
  3.  
  4. Ascii returns the Macintosh ASCII code of character. If there is more than one character in the string, Ascii returns the code of the first character.
  5.  
  6. The ¬†Char function is the counterpart of Ascii. It returns the character that an ASCII code represents.
  7.  
  8. Uppercase and lowercase characters are considered equal within a comparison. You can use Ascii to test for the case when you want to distinguish between uppercase and lowercase characters. 
  9.  
  10. For example, this line retunes ¬†True:
  11.  
  12.       ("A"="a")
  13.  
  14. This line however, returns ¬†False:
  15.  
  16.       (Ascii("A") = Ascii("a"))
  17.  
  18.  
  19. The following example returns the ASCII value of the first character of the string, in this case "A":
  20.  
  21.       GetAsc:= Ascii("ABC")         ` GetAsc gets 65
  22.  
  23.  
  24.  
  25. See also:  Ascii¬†Codes,¬†Char
  26.  
  27.